import request from "@/utils/request";
// 厂家 网络区域 业务类型 操作系统 重要性
export function queryListByTypeCode(query) {
  return request({
    url: "/analysiscenter/source/queryListByTypeCode",
    method: "get",
    params: query,
  });
}

export function queryBusinessList(params) {
  return request({
    url: "/analysiscenter/source/queryOperationSystem",
    method: "get",
    params,
  });
}

//新增资产
export function addAssets(data) {
  return request({
    url: "/analysiscenter/source/add",
    method: "post",
    data,
  });
}
//编辑资产
export function editAssets(data) {
  return request({
    url: "/analysiscenter/source/edit",
    method: "post",
    data,
  });
}
//删除资产
export function delAssets(data) {
  return request({
    url: "/analysiscenter/source/delete",
    method: "post",
    data,
  });
}
//资产树节点列表
export function treeListAssets(query) {
  return request({
    url: "/analysiscenter/assetCategory/list",
    method: "get",
    params: query,
  });
}
//资产列表
export function listAssets(query) {
  return request({
    url: "/analysiscenter/source/list",
    method: "get",
    params: query,
  });
}
//编辑资产列表
export function queryEdit(query) {
  return request({
    url: "/analysiscenter/source/query",
    method: "get",
    params: query,
  });
}
//查询资产编码
export function queryTypeCode(query) {
  return request({
    url: "/analysiscenter/assetCategory/queryTypeCode",
    method: "get",
    params: query,
  });
}
//资产详情
export function infoAssets(query) {
  return request({
    url: "/analysiscenter/source/query",
    method: "get",
    params: query,
  });
}
//连接测试
export function testConnection(data) {
  return request({
    url: "/analysiscenter/source/testConnection",
    method: "post",
    data,
  });
}
//详情告警图表
export function assetAlarmRelInfo(data) {
  return request({
    url: "/analysiscenter/source/assetAlarmRelInfo",
    method: "post",
    data,
  });
}
// 详情告警表格
export function alarmInfoList(query) {
  return request({
    url: "/analysiscenter/source/alarmInfoList",
    method: "get",
    params: query,
  });
}
// 详情日志排行
export function assetLogRelReport(data) {
  return request({
    url: "/analysiscenter/source/assetLogRelReport",
    method: "post",
    data,
  });
}
// 详情日志趋势
export function assetLogRelTrendData(data) {
  return request({
    url: "/analysiscenter/source/assetLogRelTrendData",
    method: "post",
    data,
  });
}

//分配组织
export function updateDeptId(data) {
  return request({
    url: "/analysiscenter/source/editDept",
    method: "post",
    data,
  });
}

//资产编码
export function autoAssetCode(query) {
  return request({
    url: "/analysiscenter/source/autoAssetCode",
    method: "get",
    params: query,
  });
}
